package appIdeasScrumer.web;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import appIdeasScrumer.modelo.CentroFormacion;
import appIdeasScrumer.modelo.Cobro;
import appIdeasScrumer.negocio.GestionCentroFormacion;
import appIdeasScrumer.negocio.GestionCobro;

@Controller
public class CobroController {

	@RequestMapping(value = "/mod_cobro/inicio", method = RequestMethod.GET)	
	protected ModelAndView inicioCobro(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		
		GestionCobro gcobro = new GestionCobro();
		Collection<Cobro> ccobro = new ArrayList<Cobro>();
		
		ccobro = gcobro.listar();
		
		Map<String, Object> hm = new HashMap<String, Object>();
		hm.put("COBRO", ccobro);
		
		return new ModelAndView("privado/cobro/ini_cobro", "MAP", hm);
	}

}
